<h1>Listing groups</h1>

<table  class="table table-striped">
  <thead>
    <tr>
      <th>Name</th>
      <th>Total users</th>
      <th>group checks</th>
      <th>group reply</th>
      <th>actions</th>
    </tr>
  </thead>

  <tbody>
    <% @groups.each do |group| %>
      <tr>
        <td><%= link_to group.name, group %></td>
        <td><%= group.users.count%></td>
        <td><%= link_to "radgroupcheck", group_radgroupchecks_path(group) %></td>
        <td><%= link_to "radgroupreplies", group_radgroupreplies_path(group) %></td>
        <td>
            <%= link_to btn_icon(:edit), edit_group_path(group) %>
            <%= link_to btn_icon(:trash), group, method: :delete, data: { confirm: 'Are you sure?' } %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Group', new_group_path, class: "btn btn-primary btn-mini" %>
